﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KinTN_WMS_CL.Model
{

    /// <summary>
    /// 物料表
    /// </summary>
    [Table("Materials")]
    public class Materials : ModelBase
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        [Column("Code")]
        [Required]
        public string Code { set; get; }

        /// <summary>
        /// 物料名称
        /// </summary>
        [Column("Name")]
        [Required]
        public string Name { set; get; }

        /// <summary>
        /// 物料型号
        /// 物料规格
        /// </summary>
        [Column("Spec")]
        [Required]
        public string Spec { set; get; }

        /// <summary>
        /// 基本单位编码
        /// </summary>
        [Column("BasicUnitCode")]
        [Required]
        public string BasicUnitCode { set; get; }

        /// <summary>
        /// 品牌
        /// </summary>
        [Column("Brand")]
        public string? Brand { set; get; }

        /// <summary>
        /// 物料描述
        /// </summary>
        [Column("Description")]
        public string? Description { set; get; }

        /// <summary>
        /// 是否启用
        /// </summary>
        [Column("IsEnable")]
        public bool IsEnable { set; get; } = false;

        /// <summary>
        /// 物料类型
        /// </summary>
        [Column("MaterialType")]
        public long? MaterialType { set; get; }

        /// <summary>
        /// 库存下限
        /// </summary>
        [Column("InventoryLowLimit")]
        public int? InventoryLowLimit { set; get; }

        /// <summary>
        /// 库存上限
        /// </summary>
        [Column("InventoryUpLimit")]
        public int? InventoryUpLimit { set; get; }

        /// <summary>
        /// 外部编码
        /// </summary>
        [Column("ExternalCode")]
        public string? ExternalCode { set; get; } = string.Empty;

        /// <summary>
        /// 保质期(天)
        /// </summary>
        [Column("WarrantyDay")]
        public int? WarrantyDay { set; get; }

        /// <summary>
        /// 有效期(天)
        /// </summary>
        [Column("ValidityDay")]
        public int? ValidityDay { set; get; }

        /// <summary>
        /// 排序
        /// </summary>
        [Column("Sort")]
        public int? Sort { set; get; } = 0;
        /// <summary>
        /// 供应类型
        /// </summary>
        [Column("ISupplyType")]
        public string? ISupplyType { get; set; }

        /// <summary>
        /// 停用日期
        /// </summary>
        [Column("OutageDate")]
        public string? OutageDate { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("CreatePerson")]

        public string? CreatePerson { get; set; }

        /// <summary>
        /// 变更人
        /// </summary>
        [Column("ModifyPerson")]

        public string? ModifyPerson { get; set; }
    }

}
